package org.cc.cloud;

import java.util.List;
import java.util.Map;

import org.cc.cloud.entity.Order;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.core.ChannelAwareMessageListener;

import com.rabbitmq.client.Channel;

public class MessageHandler  {

	//handleMessage是默认方法
	public void handleMessage(byte[] body) {
		System.out.println("-----------handleMessage---------");
		System.out.println(new String(body));
	}
	
	public void weixinMessage(byte[] body) {
		System.out.println("-----------weixinMessage1---------");
		System.out.println(new String(body));
	}
	public void mailMessage(byte[] body) {
		System.out.println("-----------mailMessage---------");
		System.out.println(body);
	}
	public void smsMessage(byte[] body) {
		System.out.println("-----------smsMessage---------");
		System.out.println(body);
	}
	public void smsMessage(Order body) {
		System.out.println("-----------orderMessage---------");
		System.out.println(body);
	}
	public void smsMessage(List<Order> body) {
		System.out.println("-----------orderListMessage---------");
		System.out.println(body);
	}
	public void weixinMessage(Map body) {
		System.out.println("-----------weixinMessage(Map)---------");
		System.out.println(body.toString());
	}
	public void mailMessage(Map body) {
		System.out.println("-----------mailMessage(Map)---------");
		System.out.println(body);
	}
	public void smsMessage(Map body) {
		System.out.println("-----------smsMessage(Map)---------");
		System.out.println(body);
	}
	
	public void debugMessage(Body body) {
		System.out.println("-----------bodyMessage---------");
		System.out.println(body);
	}
	public void errorMessage(byte[] body) {
		System.out.println("-----------errorMsg(byte[])---------");
		System.out.println(body.toString());
	}
	public void errorMessage(String body) {
		System.out.println("-----------errorMsg---------");
		System.out.println(body);
	}

//	@Override
//	public void onMessage(Message message, Channel channel) throws Exception {
//		// TODO Auto-generated method stub
//		
//	}	

}
